var express = require('express');
var router = express.Router();

router.post('/api/getCitiesByProId', function (req, res) {
    var body = req.body; // query | params
    var json = require('../json/city.js')
    console.log(body)
    if(body && body.data){
        body = body.data;
    }
    if(body.body.proId && json[body.body.proId]){
        res.status(200).json({body:{list:json[body.body.proId]},head:{'errorCode':'200','errorMsg':''}});
    }else{
        res.status(500).json({'head':{'errorCode':'500','errorMsg':'服务器错误'}})
    }
    // res.status(200).json([
    //     {proId:0,
    //     cityId:0,
    //     city:''}
    // ])
});

module.exports = router;
